<!DOCTYPE html>

<html lang="en-US">
<@common.header/>
<link rel="stylesheet" type="text/css" href="/static/assets/webuploader/webuploader.css">

<body class="page-sub-page page-profile page-account" id="page-top">
<!-- Wrapper -->
<div class="wrapper">
    <!-- Navigation -->
   <@common.nav/><!-- /.navigation -->
    <!-- end Navigation -->
    <!-- Page Content -->
    <div id="page-content">
        <!-- Breadcrumb -->
        <div class="container">
            <ol class="breadcrumb">
                <li><a href="#">主页</a></li>
                <li class="active">个人中心</li>
            </ol>
        </div>
        <!-- end Breadcrumb -->

        <div class="container">
            <div class="row">
            <!-- sidebar -->
            <div class="col-md-3 col-sm-3">
                <section id="sidebar">

                    <aside style="margin-top: 20px;">
                        <ul class="sidebar-navigation" style="font-size: 16px;font-weight: 700">
                            <li class="active"><a href="/accounts/profile"><i class="fa fa-user"></i><span>个人信息</span></a></li>
                            <li><a href="/accounts/reset"><i class="fa fa-user"></i><span>修改密码</span></a></li>
                            <li><a href="/house/ownlist"><i class="fa fa-home"></i><span>出售房产</span></a></li>
                            <li><a href="/house/bookmarked"><i class="fa fa-heart"></i><span>关注房产</span></a></li>
                            <li><a href="/house/bookmarked"><i class="fa fa-heart"></i><span>百科收藏</span></a></li>
                            <li><a href="/accounts/myReciveMsg"><i class="fa fa-comment"></i><span>我的消息</span></a></li>
                            <li><a href="/accounts/myleaveMsg"><i class="fa fa-comment"></i><span>我的留言</span></a></li>
                        </ul>
                    </aside>
                </section><!-- /#sidebar -->
            </div><!-- /.col-md-3 -->
            <!-- end Sidebar -->
                <!-- My Properties -->
                <div class="col-md-9 col-sm-10">
                    <section id="profile">
                        <header><h1>个人信息</h1></header>
                        <div class="account-profile" style="font-size: 20px;font-weight: 600">
                            <div class="row">
                                <div class="col-md-3 col-sm-3">
                                    <img alt="" class="image" src="${(loginUser.avatar)!}">
                                    <section id="social">
                                        <div class="form-group clearfix">
                                            <div id="uploader-demo">
                                                <div id="filePicker">更新头像</div>
                                            </div>
                                        </div><!-- /.form-group -->
                                    </section>
                                </div>
                                <div class="col-md-9 col-sm-9">
                                    <form role="form" id="form-account-profile" method="post" action="/accounts/profileSubmit">
                                        <input type="hidden" value="${(loginUser.email)!}" name="email" />
                                       
                                        <section id="contact">

                                            <dl class="contact-fields">

                                                    <div class="form-group">
                                                        <label for="form-account-name">姓名:</label>
                                                    <input type="text" class="form-control" id="form-account-name" name="name" required value="${(loginUser.name)!}" style="width: 360px;">
                                                    </div><!-- /.form-group -->


                                                 <#--   <div class="form-group">
                                                        <label for="form-account-name">昵称:</label>
                                                        <input type="text" class="form-control" id="form-account-name" name="name" required value="星曦" style="width: 360px;">
                                                    </div><!-- /.form-group &ndash;&gt;-->

                                                <div class="form-group">
                                                    <label for="form-account-name">QQ:</label>
                                                    <input type="text" class="form-control" id="form-account-name" name="qq" required value="${(loginUser.qq)!}" style="width: 360px;">
                                                </div>

                                                    <div class="form-group">
                                                        <label for="form-account-phone">手机号:</label>
                                                    <input type="text" class="form-control" id="form-account-phone" name="phone" value="${(loginUser.phone)!}" style="width: 360px;" >
                                                </div>

                                              <div class="form-group">
                                                        <label for="form-account-email">邮件:</label>
                                                    <input type="text" disabled class="form-control" id="form-account-email" name="form-account-phone" value="${(loginUser.email)!}" style="width: 360px;">
                                                </div>
                                              
                                            </dl>
                                        </section>
                                        <section id="about-me">
                                            <h3 style="font-size: 20px;font-weight: 600">自我介绍</h3>
                                            <div class="form-group">
                                                <textarea class="form-control" id="form-contact-agent-message" rows="5" name="aboutme">${(loginUser.aboutme)!}</textarea>
                                            </div><!-- /.form-group -->
                                        </section>
                                         <section id="social">
                                            <div class="form-group clearfix">
                                                <button type="submit" class="btn  btn-default" id="account-submit" style="margin-left: 200px;">更新基本信息</button>
                                            </div><!-- /.form-group -->
                                        </section>

                                       
                                    </form><!-- /#form-contact -->
                                </div><!-- /.col-md-9 -->
                            </div><!-- /.row -->
                        </div><!-- /.account-profile -->
                    </section><!-- /#profile -->
                </div><!-- /.col-md-9 -->
                <!-- end My Properties -->
            </div><!-- /.row -->
        </div><!-- /.container -->
    </div>
    <!-- end Page Content -->
    <!-- Page Footer -->
    <@common.footer/>
    <!-- end Page Footer -->
</div>

<@common.js/>
<script type="text/javascript" src="/static/assets/webuploader/webuploader.min.js"></script>
<!--[if gt IE 8]>

<script type="text/javascript" src="assets/js/ie.js"></script>
<![endif]-->
 <script  type="text/javascript" >
     

     $(document).ready(function() {
         initWebUploader();
          var errorMsg   = "${errorMsg!""}";
          var successMsg = "${successMsg!""}";
          if(errorMsg){ 
              errormsg("error",errorMsg);
          }
          if(successMsg) {
              successmsg("success",successMsg);
          }


        });


     function initWebUploader() {
         // 初始化Web Uploader
         var uploader = WebUploader.create({

             // 选完文件后，是否自动上传。
             auto: true,

             // swf文件路径
             swf: "/static/assets/webuploader/Uploader.swf",

             // 文件接收服务端。
             server: '/accounts/uploadHeadImg',

             // 选择文件的按钮。可选。
             // 内部根据当前运行是创建，可能是input元素，也可能是flash.
             pick: '#filePicker',

             // 只允许选择图片文件。
             accept: {
                 title: 'Images',
                 extensions: 'gif,jpg,jpeg,bmp,png',
                 mimeTypes: 'image/*'
             }
         });
         uploader.on( 'uploadSuccess', function( file ) {
            window.location.reload()
         });

     }
        
 </script>
</body>
</html>